package org.kjtc;


import org.junit.runner.RunWith;
import org.kjtc.entity.WxHttpChargingStation;
import org.kjtc.weChatUtil.JsonUtils;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

/**
 * 解析充电桩信息
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class AnalysisChagingSttion {

    @Resource(name = "redisTwo")
    private RedisTemplate<String, Object> redisTemplate2;
    @org.junit.Test
    public void Test(){
        String  json = (String) redisTemplate2.opsForValue().get("abnormalRule");
        WxHttpChargingStation wxRedisChargingStation = JsonUtils.jsonToPojo(json,WxHttpChargingStation.class);

        System.out.println(wxRedisChargingStation.toString());

    }


}
